package com.example.gulimall.product.vo;

import com.example.gulimall.product.entity.SkuImagesEntity;
import com.example.gulimall.product.entity.SkuInfoEntity;
import com.example.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class SkuItemVo {

    // 1.Sku基本信息获取
    SkuInfoEntity info;

    Boolean hasStock = true;

    // 2.Sku图片信息
    List<SkuImagesEntity> images;

    // 3.获取spu组合
    List<SkuItemSaleAttrVo> saleAttr;

    // 4.获取spu介绍
    SpuInfoDescEntity desp;


    // 5.获取spu的规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;


    SecKillRedisTo seckillInfo;

    @Data
    @ToString
    public static class SkuItemSaleAttrVo{
        private Long AttrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    @ToString
    public static class SpuItemAttrGroupVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    @ToString
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
}
